<template>
  <div class="pay-success">
    <h1>支付成功</h1>
    <el-result
      icon="success"
      title="支付成功"
      subTitle="请退出重新登入,以获取尊贵vip权限"
    >
      <template slot="extra">
        <el-button type="primary" @click="back" size="medium"
          >退出登入重新获得vip权限</el-button
        >
      </template>
    </el-result>
  </div>
</template>
<script> 
export default {
  methods: {
    back() {
      // 移除token
      localStorage.removeItem('yue-token')
      // 跳转到登入页面
      this.$router.push('/login')
      // 刷新页面
      location.reload()
    }
  }
}
</script>
